package com.baigu.product.dao.model;

import java.io.Serializable;
import java.util.Date;

public class BgProduct implements Serializable {
    /**
     * 产品ID
     *
     * @mbg.generated
     */
    private String id;

    /**
     * 产品分类ID
     *
     * @mbg.generated
     */
    private String categoryId;

    /**
     * 产品名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 产品描述
     *
     * @mbg.generated
     */
    private String description;

    /**
     * 明星产品图片
     *
     * @mbg.generated
     */
    private String starPic;

    /**
     * 明星产品状态（0:否，1:是）
     *
     * @mbg.generated
     */
    private Integer starStatus;

    /**
     * 上架状态（0:未上架，1:已上架）
     *
     * @mbg.generated
     */
    private Integer upperStatus;

    /**
     * 是否显示库存（0:未显示，已显示）
     *
     * @mbg.generated
     */
    private Integer showStockStatus;

    /**
     * 产品销量（暂不使用）
     *
     * @mbg.generated
     */
    private Integer spu;

    /**
     * 产品评论数
     *
     * @mbg.generated
     */
    private Integer commentNum;

    /**
     * 产品排序（数字越大越靠前）
     *
     * @mbg.generated
     */
    private Integer sort;

    /**
     * 删除标记（0:未删除，1:已删除）
     *
     * @mbg.generated
     */
    private Integer delFlag;

    /**
     * 创建人(默认系统创建:system)
     *
     * @mbg.generated
     */
    private String createBy;

    /**
     * 创建日期
     *
     * @mbg.generated
     */
    private Date createDate;

    /**
     * 最后修改人(默认系统创建:system)
     *
     * @mbg.generated
     */
    private String updateBy;

    /**
     * 最后修改日期
     *
     * @mbg.generated
     */
    private Date updateDate;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStarPic() {
        return starPic;
    }

    public void setStarPic(String starPic) {
        this.starPic = starPic;
    }

    public Integer getStarStatus() {
        return starStatus;
    }

    public void setStarStatus(Integer starStatus) {
        this.starStatus = starStatus;
    }

    public Integer getUpperStatus() {
        return upperStatus;
    }

    public void setUpperStatus(Integer upperStatus) {
        this.upperStatus = upperStatus;
    }

    public Integer getShowStockStatus() {
        return showStockStatus;
    }

    public void setShowStockStatus(Integer showStockStatus) {
        this.showStockStatus = showStockStatus;
    }

    public Integer getSpu() {
        return spu;
    }

    public void setSpu(Integer spu) {
        this.spu = spu;
    }

    public Integer getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Integer commentNum) {
        this.commentNum = commentNum;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", name=").append(name);
        sb.append(", description=").append(description);
        sb.append(", starPic=").append(starPic);
        sb.append(", starStatus=").append(starStatus);
        sb.append(", upperStatus=").append(upperStatus);
        sb.append(", showStockStatus=").append(showStockStatus);
        sb.append(", spu=").append(spu);
        sb.append(", commentNum=").append(commentNum);
        sb.append(", sort=").append(sort);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", createBy=").append(createBy);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateDate=").append(updateDate);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BgProduct other = (BgProduct) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getStarPic() == null ? other.getStarPic() == null : this.getStarPic().equals(other.getStarPic()))
            && (this.getStarStatus() == null ? other.getStarStatus() == null : this.getStarStatus().equals(other.getStarStatus()))
            && (this.getUpperStatus() == null ? other.getUpperStatus() == null : this.getUpperStatus().equals(other.getUpperStatus()))
            && (this.getShowStockStatus() == null ? other.getShowStockStatus() == null : this.getShowStockStatus().equals(other.getShowStockStatus()))
            && (this.getSpu() == null ? other.getSpu() == null : this.getSpu().equals(other.getSpu()))
            && (this.getCommentNum() == null ? other.getCommentNum() == null : this.getCommentNum().equals(other.getCommentNum()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStarPic() == null) ? 0 : getStarPic().hashCode());
        result = prime * result + ((getStarStatus() == null) ? 0 : getStarStatus().hashCode());
        result = prime * result + ((getUpperStatus() == null) ? 0 : getUpperStatus().hashCode());
        result = prime * result + ((getShowStockStatus() == null) ? 0 : getShowStockStatus().hashCode());
        result = prime * result + ((getSpu() == null) ? 0 : getSpu().hashCode());
        result = prime * result + ((getCommentNum() == null) ? 0 : getCommentNum().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        return result;
    }
}